#include <iostream>
#include <math.h>

#define PI 3.14159265

using namespace std;

class Vector3
{
private:
	double x, y, z;
public:
	Vector3(double x=0, double y=0, double z=0)
	{
		this->x = x;
		this->y = y;
		this->z = z;
	}

	void SetX (double newX)
	{
		this->x = newX;
	}

	void SetY (double newY)
	{
		this->y = newY;
	}

	void SetZ (double newZ)
	{
		this->z = newZ;
	}

	double GetX ()
	{
		return this->x;
	}

	double GetY ()
	{
		return this->y;
	}

	double GetZ ()
	{
		return this->z;
	}

	Vector3 operator + (const Vector3 &other)
	{
		return Vector3(this->x + other.x,
			this->y + other.y,
			this->z + other.z);
	}

	Vector3 operator - (const Vector3 &other)
	{
		return Vector3(this->x - other.x,
			this->y - other.y,
			this->z - other.z);
	}

	Vector3 operator * (const double &coef)
	{
		return Vector3(this->x * coef,
			this->y * coef,
			this->z * coef);
	}

	Vector3 operator / (const double &coef)
	{
		return Vector3(this->x / coef,
			this->y / coef,
			this->z / coef);
	}

	double GetLength()
	{
		double xSquared = this->x * this->x,
			ySquared = this->y * this->y,
			zSquared = this->z * this->z;

		return sqrt ( xSquared + 
			ySquared + 
			zSquared);
	}

	void Normalize()
	{
		double vLength = this->GetLength();
		Vector3 ourVector = (*this);
		(*this) = ourVector / vLength;
	}

	void RotateInXZ (double angleInDegrees)
	{
		double alpha = angleInDegrees * PI/180;
		double resultZ = this->z * cos(alpha) - this->x * sin(alpha);
		double resultX = this->z * sin(alpha) + this->x * cos(alpha);
		this->z = resultZ;
		this->x = resultX;
	}
};

int main()
{
	Vector3 A(0, 0, 5),
		B(4, 4, 4),
		vAB;

	vAB = B - A;

	//cout<<vAB.GetX()<<" "<<vAB.GetY()<<" "<<vAB.GetZ()<<endl;
	A.RotateInXZ (90);
	cout<<A.GetX()<<" "<<A.GetY()<<" "<<A.GetZ()<<endl;


	

	return 0;
}